<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../res/layui/css/layui.css">

</head>
<body>
<div class="layui-fluid">
    <fieldset class="layui-elem-field layui-field-title">
        <legend>音乐上传</legend>
        <div class="layui-field-box">
            <div class="layui-col-md6">
                <form class="layui-form layui-form-pane" lay-filter="formMusic" id="formMusic">
                    <!--表单控件项：文件上传（歌曲文件）-->
                    <div class="layui-form-item">
                        <label class="layui-form-label">歌曲文件:</label>
                        <button class="layui-btn layui-btn-normal" type="button" id="btnMusic">
                            <i class="layui-icon layui-icon-upload"></i>
                            选择文件
                        </button>
                        <!--播放器隐藏控件：获取总播放时长用-->
                        <audio src="" id="player" style="display: none"></audio>
                        <!--表单提交时提交歌曲总播放时长-->
                        <input type="hidden" name="duration" id="duration"/>
                    </div>
                    <!-- 资源类型选择控件-->
                    <div class="layui-form-item" pane>
                        <label class="layui-form-label">资源类型:</label>
                        <div class="layui-input-block">
                            <input type="radio" name="musictype" value="0" title="歌曲" checked>
                            <input type="radio" name="musictype" value="1" title="mv">
                        </div>
                    </div>

                    <!--歌曲的专辑选择控件-->
                    <div class="layui-form-item">
                        <label class="layui-form-label">歌曲专辑:</label>
                        <div class="layui-input-block">
                            <select name="aid" id="aid">
                                <option value="0">匿名</option>
                            </select>
                        </div>
                    </div>
                    <!--表单控件项：歌曲名-->
                    <div class="layui-form-item">
                        <label class="layui-form-label">歌曲名:</label>
                        <div class="layui-input-block">
                            <input class="layui-input" type="text" name="name" id="musicname" lay-verify="required"
                                   lay-verType="tips" lay-reqText="请输入歌曲名称">
                        </div>
                    </div>
                    <!--表单控件项：歌曲风格流派-->
                    <div class="layui-form-item">
                        <label class="layui-form-label">风格:</label>
                        <div class="layui-input-block">
                            <select name="style" id="style">
                                <option value="流行">流行</option>
                                <option value="Rap/Hip Hop">Rap/Hip Hop</option>
                                <option value="pop">pop</option>
                                <option value="摇滚">摇滚</option>
                                <option value="民谣">民谣</option>
                                <option value="电子">电子</option>
                                <option value="轻音乐">轻音乐</option>
                                <option value="爵士">爵士</option>
                                <option value="R&B">R&B</option>
                                <option value="乡村">乡村</option>
                                <option value="中国风">中国风</option>
                                <option value="说唱">说唱</option>
                                <option value="古典">古典</option>
                                <option value="世界音乐">世界音乐</option>
                            </select>
                        </div>
                    </div>
                    <!-- 歌词控件    -->
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">歌词:</label>
                        <div class="layui-input-block">
                            <textarea name="lrc" class="layui-textarea" placeholder="请填写歌词内容"></textarea>
                        </div>
                    </div>
                    <!-- 提交按钮    -->
                    <div class="layui-form-item" style="text-align: right">
                        <button type="button" class="layui-btn layui-btn-warm" lay-submit id="addMusic">确认添加
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </fieldset>
</div>
<script src="../res/layui/layui.js"></script>
<script>
    layui.use(function () {
        var form = layui.form;
        var layer = layui.layer;
        var $ = layui.jquery;
        //获取文件上传组件
        var upload = layui.upload;


    })
</script>
</body>
</html>